<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta th:replace="header::systemCss" />
</head>
<body>

<table id="dg" class="easyui-datagrid" title="CheckBox Selection on DataGrid"
       data-options="rownumbers:true,singleSelect:true,fit:true">
    <thead>
    <tr>
        <th data-options="field:'ck',checkbox:true"></th>
        <th data-options="field:'no',width:80">编号</th>
        <th data-options="field:'name',width:100">名称</th>
        <th data-options="field:'number',width:80,align:'right'">值</th>
    </tr>
    </thead>
</table>
<div style="margin:10px 0;">
    <span>选择模式: </span>
    <select onchange="$('#dg').datagrid({singleSelect:(this.value==0)})">
        <option value="0">Single Row</option>
        <option value="1">Multiple Rows</option>
    </select><br/>
    SelectOnCheck: <input type="checkbox" checked onchange="$('#dg').datagrid({selectOnCheck:$(this).is(':checked')})"><br/>
    CheckOnSelect: <input type="checkbox" checked onchange="$('#dg').datagrid({checkOnSelect:$(this).is(':checked')})">
</div>

<div th:replace="footer::systemJs"></div>
<script th:inline="javascript">
<!--挂载数据-->
$(function (){

})
</script>
</body>
</html>